package com.cskaoyan.vo.market;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @program: mall
 * @description:
 * @author: Mr.Mengmeng
 * @create: 2021-04-09 19:44
 **/
@Data
public class BrandDataVo {

    /**
     * total : 64
     * items : [{"id":1046035,"name":"牛皮","desc":"哈哈哈","picUrl":"http://182.92.235.201:8083/wx/storage/fetch/flxvnrc17yvwbs2gwdrm.jpg","sortOrder":50,"floorPrice":999,"addTime":"2021-04-09 17:48:29","updateTime":"2021-04-09 17:48:29","deleted":false},{"id":1046035,"name":"牛皮","desc":"哈哈哈","picUrl":"http://182.92.235.201:8083/wx/storage/fetch/flxvnrc17yvwbs2gwdrm.jpg","sortOrder":50,"floorPrice":999,"addTime":"2021-04-09 17:48:29","updateTime":"2021-04-09 17:48:29","deleted":false}]
     */

    private int total;
    private List<ItemsBean> items;

    public BrandDataVo(int total, List<ItemsBean> items) {
        this.total = total;
        this.items = items;
    }

    public BrandDataVo() {
    }
    @Data
    public static class ItemsBean {
        /**
         * id : 1046035
         * name : 牛皮
         * desc : 哈哈哈
         * picUrl : http://182.92.235.201:8083/wx/storage/fetch/flxvnrc17yvwbs2gwdrm.jpg
         * sortOrder : 50
         * floorPrice : 999.0
         * addTime : 2021-04-09 17:48:29
         * updateTime : 2021-04-09 17:48:29
         * deleted : false
         */

        private Integer id;
        private String name;
        private String desc;
        private String picUrl;
        private Byte sortOrder;
        private BigDecimal floorPrice;
        @DateTimeFormat
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
        private Date addTime;
        @DateTimeFormat
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
        private Date updateTime;
        private boolean deleted;

        public ItemsBean(Integer id, String name, String desc, String picUrl, Byte sortOrder, BigDecimal floorPrice, Date addTime, Date updateTime, boolean deleted) {
            this.id = id;
            this.name = name;
            this.desc = desc;
            this.picUrl = picUrl;
            this.sortOrder = sortOrder;
            this.floorPrice = floorPrice;
            this.addTime = addTime;
            this.updateTime = updateTime;
            this.deleted = deleted;
        }

        public ItemsBean() {
        }
    }
}
